function onUse(cid, item, fromPosition, itemEx, toPosition)
	local ITEM_GOLD_COIN = 2148
	local ITEM_PLATINUM_COIN = 2152
	local ITEM_CRYSTAL_COIN = 2160
	local ITEM_GOLD_NUGGET = 2157
	local ITEMCOUNT_MAX = 100

	local coins = {
		[ITEM_GOLD_COIN] = {
			to = ITEM_PLATINUM_COIN, effect = TEXTCOLOR_YELLOW
		},
		[ITEM_PLATINUM_COIN] = {
			from = ITEM_GOLD_COIN, to = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_BLUE
		},
		[ITEM_CRYSTAL_COIN] = {
			from = ITEM_PLATINUM_COIN, to = ITEM_GOLD_NUGGET, effect = TEXTCOLOR_LIGHTBLUE
		},
		[ITEM_GOLD_NUGGET] = {
			from = ITEM_CRYSTAL_COIN, effect = TEXTCOLOR_YELLOW
		}
	}
	
	if(getPlayerFlagValue(cid, PLAYERFLAG_CANNOTPICKUPITEM)) then
		return false
	end

	local coin = coins[item.itemid]
	if(not coin) then
		return false
	end

	if(coin.to ~= nil and item.type == ITEMCOUNT_MAX) then
		doChangeTypeItem(item.uid, item.type - item.type)
		doPlayerAddItem(cid, coin.to, 1)
		doCreatureSay(cid, "$$$", TALKTYPE_ORANGE_1)
		--doSendAnimatedText(fromPosition, "$$$", coins[coin.to].effect)
	elseif(coin.from ~= nil) then
		doChangeTypeItem(item.uid, item.type - 1)
		doPlayerAddItem(cid, coin.from, ITEMCOUNT_MAX)
		doCreatureSay(cid, "$$$", TALKTYPE_ORANGE_1)
		--doSendAnimatedText(fromPosition, "$$$", coins[coin.from].effect)
	end
	return true
end
